Skip to content

[build] build Selenium Manager Linux binaries natively and pin the Rust toolchain - #17988

Merged
titusfortner merged 3 commits into
trunkfrom
rust-ci-native-builds
Sep 6, 2026
Merged

[build] build Selenium Manager Linux binaries natively and pin the Rust toolchain#17988
titusfortner merged 3 commits into
trunkfrom
rust-ci-native-builds

Conversation

@titusfortner

Copy link
Copy Markdown
Member

💥 What does this PR do?

  • Splits the Linux jobs to build Selenium Manager on native architectures without cross
  • Bumps the Rust toolchain Bazel builds with from 1.89.0 to 1.98.1
  • Pins the rust toolchain Cargo uses to match Bazel
  • Renames the Linux arm64 artifacts to aarch64

🔧 Implementation Notes

  • RUST_VERSION is set once at the workflow level with a note to keep it in sync with MODULE.bazel.
  • TARGET_CC points cc-rs at musl-gcc for ring and the -sys crates. It is TARGET_CC rather than a per-target CC_* because expressions are not allowed in YAML keys, and it leaves build scripts on the host gcc.

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code (Opus 5)
    • What was generated: the job-timing analysis, the workflow changes, verification of the produced binaries, and this description
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

🔄 Types of changes

  • Bug fix (backwards compatible)

@selenium-ci selenium-ci added the B-build Includes scripting, bazel and CI integrations label Sep 6, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Build native Linux binaries with pinned Rust 1.98.1

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Builds x86_64 and aarch64 Linux binaries on matching native GitHub runners.
• Pins CI Cargo and Bazel builds to Rust 1.98.1.
• Standardizes ARM artifact and checksum names on aarch64.
Diagram

graph TD
  CI["Rust CI Workflow"] --> PIN["Rust 1.98.1"] --> TEST["Bazel Tests"] --> MATRIX["Native Linux Matrix"] --> X64["x86_64 Build"] --> ART["Build Artifacts"] --> RELEASE["Release Publish"]
  MATRIX --> ARM["aarch64 Build"] --> ART
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Retain cross-based builds
  • ➕ Keeps both Linux architectures in one runner job
  • ➕ Avoids requiring GitHub-hosted ARM runners
  • ➖ Depends on the external cross tool and its container environment
  • ➖ Uses emulation or cross-compilation instead of validating native architecture builds
  • ➖ Adds tool installation time and another source of build failures
2. Build all Linux artifacts with Bazel
  • ➕ Unifies testing and release builds under one build system
  • ➕ Centralizes toolchain and target configuration
  • ➕ Could eliminate duplicated Cargo release jobs
  • ➖ Depends on pending Linux cross-compilation support
  • ➖ Introduces a larger migration than this CI reliability fix
  • ➖ May not yet cover debug and ancillary artifact requirements
3. Pin Cargo with rust-toolchain.toml
  • ➕ Automatically selects the same Cargo toolchain for local and CI builds
  • ➕ Removes repeated rustup default commands from workflow jobs
  • ➖ Still requires synchronization with the Bazel toolchain declaration
  • ➖ Changes local developer toolchain behavior beyond this CI-focused scope
  • ➖ Target installation and platform-specific setup remain necessary

Recommendation: Use the PR's native matrix approach now: it removes the cross dependency, validates each Linux architecture on matching hardware, and preserves existing release behavior. A Bazel-only pipeline is the strongest longer-term option once cross-compilation support covers all required release artifacts.

Files changed (2) +80 / -67

Other (2) +80 / -67
ci-rust.ymlBuild native Linux artifacts with a pinned Rust toolchain +78/-66

Build native Linux artifacts with a pinned Rust toolchain

• Pins Rust 1.98.1 across Windows, Linux, macOS, and SBOM jobs. Replaces cross-based Linux builds with native x86_64 and aarch64 matrices using musl-gcc, and renames ARM artifacts, checksum keys, and release paths to aarch64.

.github/workflows/ci-rust.yml

MODULE.bazelUpgrade and synchronize the Bazel Rust toolchain +2/-1

Upgrade and synchronize the Bazel Rust toolchain

• Upgrades the Bazel Rust toolchain from 1.89.0 to 1.98.1 and documents that it must remain synchronized with the CI workflow version.

MODULE.bazel

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can show, collapse, or hide each part of a finding: code, evidence, and all

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@titusfortner
titusfortner merged commit 77ea3d0 into trunk Sep 6, 2026
66 of 67 checks passed
@titusfortner
titusfortner deleted the rust-ci-native-builds branch September 6, 2026 20:00
This was referenced Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-build Includes scripting, bazel and CI integrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants